\(\int x^3 \cosh ^2(a+b x^2) \, dx\) [8]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 51 \[ \int x^3 \cosh ^2\left (a+b x^2\right ) \, dx=\frac {x^4}{8}-\frac {\cosh ^2\left (a+b x^2\right )}{8 b^2}+\frac {x^2 \cosh \left (a+b x^2\right ) \sinh \left (a+b x^2\right )}{4 b} \]

[Out]

1/8*x^4-1/8*cosh(b*x^2+a)^2/b^2+1/4*x^2*cosh(b*x^2+a)*sinh(b*x^2+a)/b

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {5429, 3391, 30} \[ \int x^3 \cosh ^2\left (a+b x^2\right ) \, dx=-\frac {\cosh ^2\left (a+b x^2\right )}{8 b^2}+\frac {x^2 \sinh \left (a+b x^2\right ) \cosh \left (a+b x^2\right )}{4 b}+\frac {x^4}{8} \]

[In]

Int[x^3*Cosh[a + b*x^2]^2,x]

[Out]

x^4/8 - Cosh[a + b*x^2]^2/(8*b^2) + (x^2*Cosh[a + b*x^2]*Sinh[a + b*x^2])/(4*b)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 3391

Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*((b*Sin[e + f*x])^n/(f^2*n^
2)), x] + (Dist[b^2*((n - 1)/n), Int[(c + d*x)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[b*(c + d*x)*Cos[e + f*x
]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]

Rule 5429

Int[((a_.) + Cosh[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Cosh[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Sim
plify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int x \cosh ^2(a+b x) \, dx,x,x^2\right ) \\ & = -\frac {\cosh ^2\left (a+b x^2\right )}{8 b^2}+\frac {x^2 \cosh \left (a+b x^2\right ) \sinh \left (a+b x^2\right )}{4 b}+\frac {1}{4} \text {Subst}\left (\int x \, dx,x,x^2\right ) \\ & = \frac {x^4}{8}-\frac {\cosh ^2\left (a+b x^2\right )}{8 b^2}+\frac {x^2 \cosh \left (a+b x^2\right ) \sinh \left (a+b x^2\right )}{4 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.78 \[ \int x^3 \cosh ^2\left (a+b x^2\right ) \, dx=-\frac {\cosh \left (2 \left (a+b x^2\right )\right )-2 b x^2 \left (b x^2+\sinh \left (2 \left (a+b x^2\right )\right )\right )}{16 b^2} \]

[In]

Integrate[x^3*Cosh[a + b*x^2]^2,x]

[Out]

-1/16*(Cosh[2*(a + b*x^2)] - 2*b*x^2*(b*x^2 + Sinh[2*(a + b*x^2)]))/b^2

Maple [A] (verified)

Time = 0.15 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.90

method result size
parallelrisch \(\frac {2 b^{2} x^{4}+2 b \,x^{2} \sinh \left (2 b \,x^{2}+2 a \right )-\cosh \left (2 b \,x^{2}+2 a \right )+1}{16 b^{2}}\) \(46\)
risch \(\frac {x^{4}}{8}+\frac {\left (2 b \,x^{2}-1\right ) {\mathrm e}^{2 b \,x^{2}+2 a}}{32 b^{2}}-\frac {\left (2 b \,x^{2}+1\right ) {\mathrm e}^{-2 b \,x^{2}-2 a}}{32 b^{2}}\) \(55\)

[In]

int(x^3*cosh(b*x^2+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/16*(2*b^2*x^4+2*b*x^2*sinh(2*b*x^2+2*a)-cosh(2*b*x^2+2*a)+1)/b^2

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.18 \[ \int x^3 \cosh ^2\left (a+b x^2\right ) \, dx=\frac {2 \, b^{2} x^{4} + 4 \, b x^{2} \cosh \left (b x^{2} + a\right ) \sinh \left (b x^{2} + a\right ) - \cosh \left (b x^{2} + a\right )^{2} - \sinh \left (b x^{2} + a\right )^{2}}{16 \, b^{2}} \]

[In]

integrate(x^3*cosh(b*x^2+a)^2,x, algorithm="fricas")

[Out]

1/16*(2*b^2*x^4 + 4*b*x^2*cosh(b*x^2 + a)*sinh(b*x^2 + a) - cosh(b*x^2 + a)^2 - sinh(b*x^2 + a)^2)/b^2

Sympy [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.53 \[ \int x^3 \cosh ^2\left (a+b x^2\right ) \, dx=\begin {cases} - \frac {x^{4} \sinh ^{2}{\left (a + b x^{2} \right )}}{8} + \frac {x^{4} \cosh ^{2}{\left (a + b x^{2} \right )}}{8} + \frac {x^{2} \sinh {\left (a + b x^{2} \right )} \cosh {\left (a + b x^{2} \right )}}{4 b} - \frac {\cosh ^{2}{\left (a + b x^{2} \right )}}{8 b^{2}} & \text {for}\: b \neq 0 \\\frac {x^{4} \cosh ^{2}{\left (a \right )}}{4} & \text {otherwise} \end {cases} \]

[In]

integrate(x**3*cosh(b*x**2+a)**2,x)

[Out]

Piecewise((-x**4*sinh(a + b*x**2)**2/8 + x**4*cosh(a + b*x**2)**2/8 + x**2*sinh(a + b*x**2)*cosh(a + b*x**2)/(
4*b) - cosh(a + b*x**2)**2/(8*b**2), Ne(b, 0)), (x**4*cosh(a)**2/4, True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.16 \[ \int x^3 \cosh ^2\left (a+b x^2\right ) \, dx=\frac {1}{8} \, x^{4} + \frac {{\left (2 \, b x^{2} e^{\left (2 \, a\right )} - e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x^{2}\right )}}{32 \, b^{2}} - \frac {{\left (2 \, b x^{2} + 1\right )} e^{\left (-2 \, b x^{2} - 2 \, a\right )}}{32 \, b^{2}} \]

[In]

integrate(x^3*cosh(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/8*x^4 + 1/32*(2*b*x^2*e^(2*a) - e^(2*a))*e^(2*b*x^2)/b^2 - 1/32*(2*b*x^2 + 1)*e^(-2*b*x^2 - 2*a)/b^2

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 142 vs. \(2 (45) = 90\).

Time = 0.26 (sec) , antiderivative size = 142, normalized size of antiderivative = 2.78 \[ \int x^3 \cosh ^2\left (a+b x^2\right ) \, dx=\frac {4 \, {\left (b x^{2} + a\right )}^{2} + 2 \, {\left (b x^{2} + a\right )} e^{\left (2 \, b x^{2} + 2 \, a\right )} - 2 \, {\left (b x^{2} + a\right )} e^{\left (-2 \, b x^{2} - 2 \, a\right )} - e^{\left (2 \, b x^{2} + 2 \, a\right )} - e^{\left (-2 \, b x^{2} - 2 \, a\right )}}{32 \, b^{2}} - \frac {4 \, {\left (b x^{2} + a\right )} a + a e^{\left (2 \, b x^{2} + 2 \, a\right )} - {\left (2 \, a e^{\left (2 \, b x^{2} + 2 \, a\right )} + a\right )} e^{\left (-2 \, b x^{2} - 2 \, a\right )}}{16 \, b^{2}} \]

[In]

integrate(x^3*cosh(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/32*(4*(b*x^2 + a)^2 + 2*(b*x^2 + a)*e^(2*b*x^2 + 2*a) - 2*(b*x^2 + a)*e^(-2*b*x^2 - 2*a) - e^(2*b*x^2 + 2*a)
 - e^(-2*b*x^2 - 2*a))/b^2 - 1/16*(4*(b*x^2 + a)*a + a*e^(2*b*x^2 + 2*a) - (2*a*e^(2*b*x^2 + 2*a) + a)*e^(-2*b
*x^2 - 2*a))/b^2

Mupad [B] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.82 \[ \int x^3 \cosh ^2\left (a+b x^2\right ) \, dx=\frac {x^4}{8}-\frac {\frac {\mathrm {cosh}\left (2\,b\,x^2+2\,a\right )}{16}-\frac {b\,x^2\,\mathrm {sinh}\left (2\,b\,x^2+2\,a\right )}{8}}{b^2} \]

[In]

int(x^3*cosh(a + b*x^2)^2,x)

[Out]

x^4/8 - (cosh(2*a + 2*b*x^2)/16 - (b*x^2*sinh(2*a + 2*b*x^2))/8)/b^2